package com.tanhua.model.vo;

import com.tanhua.model.pojo.Admin;
import com.tanhua.model.pojo.Options;
import com.tanhua.model.pojo.Questions;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuestionsVo implements Serializable {
    private String id;
    private String question;
    private String questionnaireId;
    private List<Options> options;

    public static QuestionsVo init(Questions questions,List<Options> list) {
        QuestionsVo vo = new QuestionsVo();
        vo.setId(questions.getId());
        vo.setQuestion(questions.getQuestion());
        vo.setQuestionnaireId(questions.getQuestionnaireId());
        vo.setOptions(list);
        return vo;
    }
}
